TestMenu = {}

function TestMenu.Panel()
	local DermaPanel = vgui.Create( "DFrame" )
	DermaPanel:SetTitle( "Testing Derma Stuff" )
	DermaPanel:ShowCloseButton(true)
	DermaPanel:SetBackgroundBlur( false )
	DermaPanel:SetPos( 50, 50 )
	DermaPanel:SetSize( 600, 600 )
	DermaPanel:SetVisible( true )
	DermaPanel:SetDraggable( true )
	DermaPanel:ShowCloseButton( true )
	DermaPanel:MakePopup()
	///////////////////////////////////////////////////////////////
	local TestingPanel = vgui.Create( "DPanel", TestingPanel )
 TestingPanel:SetPos( 25, 50 )
 TestingPanel:SetSize( 250, 250 )
 TestingPanel.Paint = function() // Paint function
 surface.SetDrawColor( 50, 50, 50, 255 ) // Set our rect color below us; we do this so you can see items added to this panel
 surface.DrawRect( 0, 0, TestingPanel:GetWide(), TestingPanel:GetTall() ) // Draw the rect
 end
 
 local TestingPanel2 = vgui.Create( "DPanel", TestingPanel2 )
 TestingPanel2:SetPos( 25, 50 )
 TestingPanel2:SetSize( 250, 250 )
 TestingPanel2.Paint = function() // Paint function
 surface.SetDrawColor( 50, 50, 50, 255 ) // Set our rect color below us; we do this so you can see items added to this panel
 surface.DrawRect( 0, 0, TestingPanel2:GetWide(), TestingPanel2:GetTall() ) // Draw the rect
 end
//////////////////////////////////////////////////////////////////////////////// 
 ///////////////----------------------------------/////////////////////////////// 
 
 ///////////////----------------------------------///////////////////////////////  
 ///////////////-------------//////////-----------/////////////////////////////// 	
	   local PropertySheet = vgui.Create( "DPropertySheet" )
   PropertySheet:SetParent( DermaPanel )
   PropertySheet:SetPos( 40, 40 )
   PropertySheet:SetSize( 500, 500 )
 ///////////////-------------//////////-----------/////////////////////////////// 	
	
	
	
	 local CategoryContentOne = vgui.Create( "DCheckBoxLabel", TestingPanel )
  CategoryContentOne:SetText( "Bloom" )
   CategoryContentOne:SetConVar( "pp_bloom" )
  CategoryContentOne:SetParent ( TestingPanel )
   CategoryContentOne:SetSize( 500, 500 )
  
  local DermaText = vgui.Create( "DTextEntry", TestingPanel )
   DermaText:SetPos( 20,25 )
   DermaText:SetParent( TestingPanel )
   DermaText:SetTall( 20 )
   DermaText:SetWide( 450 )
   DermaText:SetEnterAllowed( true )
   DermaText.OnEnter = function()
    Msg("You entered -"..DermaText:GetValue().."-!" ) // What happens when you press enter
    DermaPanel:SetVisible( false )
   end 
   
     myButton = vgui.Create("DButton", TestingPanel)
	 myButton:SetPos( 5, 60 )
	 myButton:SetSize( 80, 20 )
  myButton:SetText("Hello World!")
  myButton.DoClick = function()
   Msg("You clicked the button!\n")
   end
  myButton.DoRightClick = function()
   Msg("You right-clicked the button!\n")
   end 
/////////////////////////////////////////////////////
	 local NumSliderThingy = vgui.Create( "DNumSlider", TestingPanel2 )
  NumSliderThingy:SetPos( 25,50 )
  NumSliderThingy:SetSize( 150, 100 ) // Keep the second number at 100
  NumSliderThingy:SetText( "Max Props" )
  NumSliderThingy:SetParent( TestingPanel2 )
  NumSliderThingy:SetMin( 0 ) // Minimum number of the slider
  NumSliderThingy:SetMax( 256 ) // Maximum number of the slider
  NumSliderThingy:SetDecimals( 0 ) // Sets a decimal. Zero means it's a whole number
  NumSliderThingy:SetConVar( "sbox_maxprops" )
  
  
  local CategoryContentOne = vgui.Create( "DCheckBoxLabel", TestingPanel2 )
  CategoryContentOne:SetText( "Cheats" )
   CategoryContentOne:SetConVar( "sv_cheats" )
  CategoryContentOne:SetParent ( TestingPanel2 )
   CategoryContentOne:SetSize( 500, 500 )
//////////////////////////////////////////////	


PropertySheet:AddSheet( "Client Menu", TestingPanel, "gui/silkicons/world", false, false, "Client" )
PropertySheet:AddSheet( "Admin Menu", TestingPanel2, "gui/silkicons/shield", false, false, "Admin" )

///////////////////////////////////////////////////////////////	
	DermaPanel:RequestFocus( )
end

function onChat( playerindex, playername, text )
	if (text == "!testpanel") then
		TestMenu.Panel()
	end
end

hook.Add( "ChatText", "ChatTextHook", onChat )